<?php
    function dept_profile_validation($form) {


    // Check bad character validation

	chkbadchar($form['field_pro_pro']['und'][0]['value']['#value'],  $form['field_pro_pro']['und'][0]['value']['#title'],'field_pro_pro');
    chkbadchar($form['title']['#value'], $form['title']['#title'], 'title');
	chkbadchar($form['field_pro_other']['und'][0]['value']['#value'],$form['field_pro_other']['und'][0]['value']['#title'], 'field_pro_other');

	// maximum length validation for Title and Description Field
    maxlength_validation($form['title']['#value'], 255, $form['title']['#title'], 'title');

	// minimum length charcter
	minilength_validation($form['title']['#value'], 5, $form['title']['#title'], 'title');
	minilength_validation($form['field_pro_pro']['und'][0]['value']['#value'], 5,  $form['field_pro_pro']['und'][0]['value']['#title'],'field_pro_pro');
	minilength_validation($form['field_pro_other']['und'][0]['value']['#value'], 5, $form['field_pro_other']['und'][0]['value']['#title'], 'field_pro_other');

}


